<template>
  <div class="dzCard">
    <div class="item" v-for="(item,index) in list" :key="index" @click="changeItem(item,index)">
      <div class="item-image">
        <img :src="item.imgUrl" alt="">
      </div>
      <div class="box-item over-hide-1">{{ item.name }}</div>
    </div>
  </div>
</template>

<script>
  export default {
    props:['list'],
    methods:{
      changeItem(item,index){
        this.$emit('openBox',index)
      }
    }
  }
</script>

<style scoped lang="scss">
.dzCard{
  width: 100%;
  height: 83px;
  display: flex;
  justify-content: space-between;
  padding: 0 10px;
  box-sizing: border-box;
  .item{
    width: 130px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 0;
    box-sizing: border-box;
    .item-image{
      width: 100%;
      text-align: center;
      img{
        width: 38px;
        height: 38px;
        object-fit: cover;
      }
    }

    .box-item{
      min-width: 108px;
      height: 22px;
      background: linear-gradient( 90deg, #FFB400 0%, #FFFFFF 100%);
      border-radius: 20px 20px 20px 20px;
      border: 1px solid #FFFFFF;
      display: flex;
      justify-content: center;
      box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;
      align-items: center;
      font-weight: bold;
      font-size: 10px;
      color: #3F3F3F;
    }
  }
}
</style>